﻿' ----------------------------------------------------------------------------------
' Microsoft Developer & Platform Evangelism
' 
' Copyright (c) Microsoft Corporation. All rights reserved.
' 
' THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ----------------------------------------------------------------------------------
' The example companies, organizations, products, domain names,
' e-mail addresses, logos, people, places, and events depicted
' herein are fictitious.  No association with any real company,
' organization, product, domain name, email address, logo, person,
' places, or events is intended or should be inferred.
' ----------------------------------------------------------------------------------

Imports System.ComponentModel
Imports System.Data.Services.Common

Namespace Models

    <EntitySetAttribute("SqlSampleData"), DataServiceKeyAttribute("Id")>
    Public Class SqlSampleData
        Implements INotifyPropertyChanged
        Private id_Renamed As Integer
        Private userId_Renamed As String
        Private title_Renamed As String
        Private date_Renamed As DateTime
        Private isPublic_Renamed As Boolean

        Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged

        Public Property Id() As Integer
            Get
                Return Me.id_Renamed
            End Get

            Set(ByVal value As Integer)
                Me.id_Renamed = value
                Me.OnPropertyChanged("Id")
            End Set
        End Property

        Public Property UserId() As String
            Get
                Return Me.userId_Renamed
            End Get

            Set(ByVal value As String)
                Me.userId_Renamed = value
                Me.OnPropertyChanged("UserId")
            End Set
        End Property

        Public Property Title() As String
            Get
                Return Me.title_Renamed
            End Get

            Set(ByVal value As String)
                Me.title_Renamed = value
                Me.OnPropertyChanged("Title")
            End Set
        End Property

        Public Property [Date]() As DateTime
            Get
                Return Me.date_Renamed
            End Get

            Set(ByVal value As DateTime)
                Me.date_Renamed = value
                Me.OnPropertyChanged("Date")
            End Set
        End Property

        Public Property IsPublic() As Boolean
            Get
                Return Me.isPublic_Renamed
            End Get

            Set(ByVal value As Boolean)
                Me.isPublic_Renamed = value
                Me.OnPropertyChanged("IsPublic")
            End Set
        End Property

        Protected Overridable Sub OnPropertyChanged(ByVal changedProperty As String)
            Dim propertyChanged = Me.PropertyChangedEvent
            If PropertyChangedEvent IsNot Nothing Then
                PropertyChangedEvent(Me, New PropertyChangedEventArgs(changedProperty))
            End If
        End Sub
    End Class
End Namespace